<template>
  <div>
    <el-table
      :data="list.slice((currpage - 1) * pagesize, currpage * pagesize)"
      border
      style="width: 100%"
    >
      <el-table-column prop="opening_hours" label="日期" width="263">
      </el-table-column>
      <el-table-column prop="name" label="姓名" width="400"> </el-table-column>
      <el-table-column prop="address" label="地址" width="550">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name:"",
  data() {
    return {
      list:[],
      pagesize:5,
      currpage:1,
    }
  },
  created(){
    this.$axios.get("shopList.json").then(res=>{
      this.list = res.data
    })
  },
  methods: {
    handleChange(val){
      this.pagesize = val
    },
    handleChange(val){
      this.currpage = val
    }
  },
}
</script>